package nowcoder.huawei;

import java.io.FileNotFoundException;
import java.io.FileReader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;

/**
 * @author wuguojian
 * @description
 * @date 2023/4/12 下午9:46
 * https://www.nowcoder.com/practice/5af18ba2eb45443aa91a11e848aa6723
 **/
public class HJ14 {
    public static void main(String[] args) throws FileNotFoundException {
        Scanner in = new Scanner(new FileReader("input/nowcoder_huawei/HJ14.txt"));
//        Scanner in = new Scanner(System.in);
        while (in.hasNext()) {
            int a = in.nextInt();
            ArrayList s = new ArrayList(a);
            for (int i = 0; i < a; i++) {
                s.add(in.next());
            }
            Collections.sort(s);
            for (int i = 0; i < a; i++) {
                System.out.println(s.get(i));
            }
        }
    }
}
